package cn.secby.goods.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.*;
import cn.secby.common.core.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import cn.secby.common.core.web.domain.TreeEntity;

/**
 * 商品分类对象 tb_category
 * @author shenkunlin
 * @date 2025-03-30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "tb_category")
public class Category extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(value ="id" ,type = IdType.ASSIGN_ID )
    @JsonSerialize(using=ToStringSerializer.class)
    private Long id;

    /** 分类名字 */
    @Excel(name = "分类名字")
    @TableField(value = "name")
    private String name;

    /** 来源,1本系统，2其他系统 */
    @Excel(name = "来源,1本系统，2其他系统")
    @TableField(value = "type_source")
    private Integer typeSource;

    /** 是否删除，1 未删除，2 已删除 */
    @TableField(value = "is_del")
    @TableLogic(value = "1", delval = "2")
    private Integer isDel;

}
